<?php
/**
 * Shipping shipping_detail, Order_detail,customer,product
 *
 * @author Mike Gao
 */
class ShippingOrderDetailViewModel extends ViewModel{
    protected $pk  = 'Shipping.id';

    public $viewFields = array(
    	'Shipping' => array('*'),
    	'Order' => array('mano'=>'order_mano','_as' => 'Sale','_on' =>'Sale.id = Shipping.order_id'),
        'Customer' => array('name'=>'customer','concat(Customer.company,"; ",Customer.name)'=>'customer_info',  '_on' => 'Sale.customer_id = Customer.id'),
        'Shipping_detail' => array('id'=>'sid','_on' => 'Shipping.id = Shipping_detail.shipping_id'),
        'Order_detail' => array('id'=>'did','mano'=>'dmano','status'=>'dstatus','_on' => 'Order_detail.id = Shipping_detail.order_detail_id'),
        'Product' => array('id'=>'pid', 'name','ename', 'cas','unit_id','_on' => 'Shipping_detail.product_id = Product.id'),
        
    );


}
?>
